XTI-Level Options
Open Transport defines XTI-level options. These options are not association-
related; they are negotiated between the client and its endpoint provider. If the protocol you are using supports these options, you can negotiate them while the endpoint is in any state. The protocol level for all of these options isXTI_GENERIC
. The constant names used to specify XTI-level options are given by the following enumeration:
enum { XTI_DEBUG = (OTXTIName)0x0001, XTI_LINGER = (OTXTIName)0x0080, XTI_RCVBUF = (OTXTIName)0x1002, XTI_RCVLOWAT = (OTXTIName)0x1004, XTI_SNDBUF = (OTXTIName)0x1001, XTI_SNDLOWAT = (OTXTIName)0x1003, XTI_PROTOTYPE = (OTXTIName)0x1005 };Constant Descriptions
XTI_DEBUG
- A constant specifying whether debugging is enabled. Debugging is disabled if the option is specified with no value. This option is an absolute requirement.
XTI_LINGER
- A value defined by a linger structure (page 5-31) that specifies whether the option is turned on (
T_YES
) or off (T_NO
) and specifies a linger period in seconds. This option is an absolute requirement.- You use this option to extend the execution of the
OTCloseProvider
function for some specified amount of time. The delay allows data still queued in the endpoint's internal send buffer to be sent before the endpoint provider is closed. If you call theOTCloseProvider
function and the send buffer is not empty, the endpoint provider attempts to send the remaining data during the linger period, before closing. Open Transport discards any data remaining in the send buffer after the linger period has elapsed.
- Consult the documentation for your protocol to determine the valid range of values for the linger period.
XTI_RCVBUF
- A positive number specifying the size of the endpoint's internal buffer allocated for receiving data. You can increase the size of this buffer for high-volume connections or decrease the buffer to limit the possible backlog of incoming data.
- This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the buffer size.
XTI_RCVLOWAT
- A positive number specifying the low-water mark for the receive buffer-- that is, the minimum number of bytes that must accumulate in the endpoint's internal receive buffer before you are advised that data has arrived via a
T_DATA
event. Choosing a value that is too low might result in your application's getting an excessive number ofT_DATA
events and doing unnecessary reads. Choosing a value that is too high might result in buffer overflow and loss of data.- This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the low-water mark.
XTI_SNDBUF
- A positive number specifying the size of the endpoint's internal buffer allocated for sending data. Specifying a value that is too low might result in Open Transport doing more sends than necessary and wasting processor time; specifying a value that is too high might cause flow control problems.
- This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the buffer size.
XTI_SNDLOWAT
- A positive number specifying the low-water mark for the send buffer-- that is, the minimum number of bytes that must accumulate in the endpoint's internal send buffer before Open Transport actually sends the data. Choosing a value that is too low might result in Open Transport's doing too many sends and wasting processor time. Choosing a value that is too high might result in flow control problems. A value that is slightly lower than
the largest packet size defined for the endpoint is a
good choice.- This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the low-water mark.
XTI_PROTOTYPE
- The number of the protocol to be used by a RawIP endpoint. For additional information, see the chapter "TCP/IP Services" in this book.